<div>
<?php 
  //odkaz veduci na listing projektov (akcia admin_list)
  //'admin' => true znamena, ze v url sa pouzije prefix "admin" a zavila sa akcia s tymto preffixom, cize "admin" + "list" = "admin_list"
  // http://book.cakephp.org/2.0/en/core-libraries/helpers/html.html#HtmlHelper::link
  $tmp = $this->Html->link('Späť', array('admin' => true, 'controller' => 'projects', 'action' => 'list'));
  echo str_replace('Späť', '<button class="bold rounded bordered gradient">Späť</button>', $tmp);
?>  

<?php   
  // nezaregistrovany pouzivatel nema pravo vidiel zmazane projekty
  if (!($this->Session->check('Auth.User'))&&($data['Project']['is_deleted'] == 1))
    continue;
?>
  <h1><?php echo $data['Project']['name']?></h1>
  
  <div id="detail">
    <p><?php echo '<b>Anotácia:</b><br />'.$data['Project']['annotation'];?> </p>
    <p><?php echo '<b>Katedra:</b><br />'.$data['Department']['name'].' - '.$data['Department']['fullname']; ?> </p>
    <p><?php echo '<b>Vedúci:</b><br />'.$data['Leader']['fullname']; ?> </p>
    <p>
    <?php echo '<b>Participanti </b><br />'.$data['Leader']['fullname'].'';
          foreach($data['Person'] as $per){
            if($per['fullname'] == $data['Leader']['fullname'])
              continue;
            echo ', '.$per['fullname'];
          }
    ?>
    </p>
    <p><?php echo '<b>Rozpočet:</b><br />'.$this->Number->format($data['Project']['budget'], array('places' => 2, 'before' => '', 'after' => '€', 'decimals' => ',', 'thousands' => ' ')); ?> </p>
    <?php if($data['Project']['is_deleted'] == 1) echo '<p>Projekt je už zmazaný</p>';?>
    <p><?php echo '<b>Začiatok:</b><br />'.$this->Time->format('d.m.Y', $data['Project']['start']); ?> </p>
    <p><?php echo '<b>Koniec:</b><br />'.$this->Time->format('d.m.Y', $data['Project']['end']); ?> </p>
  </div>
</div>

